package org.student.servlet;

import java.io.IOException;
import java.util.*;


import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.student.Iservice.IStudentService;
import org.student.entity.Student;
import org.student.service.impl.StudentServiceimpl;

public class QueryStudentByPage extends HttpServlet {
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		IStudentService  studentService = new StudentServiceimpl();
		int TotalCount = studentService.getTotalCount();
		int  currentPage = 1;
		int  pageSize = 3;
		List<Student> students = studentService.queryStudentByPage(currentPage, pageSize);
		System.out.println(students);
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doGet(request, response);
	}

}
